Integrand size = 25, antiderivative size = 477 \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=-\frac {\cos ^2(c+d x) \cot (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\sqrt {a+b} \cos (c+d x) \sin (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)} \left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right )}-\frac {\sqrt [4]{a+b} \cos ^2(c+d x) E\left (2 \arctan \left (\frac {\sqrt [4]{a+b} \tan (c+d x)}{\sqrt [4]{a}}\right )|\frac {1}{2} \left (1-\frac {\sqrt {a}}{\sqrt {a+b}}\right )\right ) \left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right ) \sqrt {\frac {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}{\left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right )^2}}}{a^{3/4} d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\sqrt [4]{a+b} \cos ^2(c+d x) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{a+b} \tan (c+d x)}{\sqrt [4]{a}}\right ),\frac {1}{2} \left (1-\frac {\sqrt {a}}{\sqrt {a+b}}\right )\right ) \left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right ) \sqrt {\frac {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}{\left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right )^2}}}{2 a^{3/4} d \sqrt {a+b \sin ^4(c+d x)}} \]
[Out]
Time = 0.41 (sec) , antiderivative size = 477, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3311, 1137, 12, 1153, 1117, 1209} \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=\frac {\sqrt [4]{a+b} \cos ^2(c+d x) \left (\sqrt {a+b} \tan ^2(c+d x)+\sqrt {a}\right ) \sqrt {\frac {(a+b) \tan ^4(c+d x)+2 a \tan ^2(c+d x)+a}{\left (\sqrt {a+b} \tan ^2(c+d x)+\sqrt {a}\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{a+b} \tan (c+d x)}{\sqrt [4]{a}}\right ),\frac {1}{2} \left (1-\frac {\sqrt {a}}{\sqrt {a+b}}\right )\right )}{2 a^{3/4} d \sqrt {a+b \sin ^4(c+d x)}}-\frac {\sqrt [4]{a+b} \cos ^2(c+d x) \left (\sqrt {a+b} \tan ^2(c+d x)+\sqrt {a}\right ) \sqrt {\frac {(a+b) \tan ^4(c+d x)+2 a \tan ^2(c+d x)+a}{\left (\sqrt {a+b} \tan ^2(c+d x)+\sqrt {a}\right )^2}} E\left (2 \arctan \left (\frac {\sqrt [4]{a+b} \tan (c+d x)}{\sqrt [4]{a}}\right )|\frac {1}{2} \left (1-\frac {\sqrt {a}}{\sqrt {a+b}}\right )\right )}{a^{3/4} d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\sqrt {a+b} \sin (c+d x) \cos (c+d x) \left ((a+b) \tan ^4(c+d x)+2 a \tan ^2(c+d x)+a\right )}{a d \sqrt {a+b \sin ^4(c+d x)} \left (\sqrt {a+b} \tan ^2(c+d x)+\sqrt {a}\right )}-\frac {\cos ^2(c+d x) \cot (c+d x) \left ((a+b) \tan ^4(c+d x)+2 a \tan ^2(c+d x)+a\right )}{a d \sqrt {a+b \sin ^4(c+d x)}} \]
[In]
[Out]
Rule 12
Rule 1117
Rule 1137
Rule 1153
Rule 1209
Rule 3311
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\cos ^2(c+d x) \sqrt {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}\right ) \text {Subst}\left (\int \frac {1}{x^2 \sqrt {a+2 a x^2+(a+b) x^4}} \, dx,x,\tan (c+d x)\right )}{d \sqrt {a+b \sin ^4(c+d x)}} \\ & = -\frac {\cos ^2(c+d x) \cot (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\left (\cos ^2(c+d x) \sqrt {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}\right ) \text {Subst}\left (\int \frac {(a+b) x^2}{\sqrt {a+2 a x^2+(a+b) x^4}} \, dx,x,\tan (c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}} \\ & = -\frac {\cos ^2(c+d x) \cot (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\left ((a+b) \cos ^2(c+d x) \sqrt {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}\right ) \text {Subst}\left (\int \frac {x^2}{\sqrt {a+2 a x^2+(a+b) x^4}} \, dx,x,\tan (c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}} \\ & = -\frac {\cos ^2(c+d x) \cot (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\left (\sqrt {a+b} \cos ^2(c+d x) \sqrt {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+2 a x^2+(a+b) x^4}} \, dx,x,\tan (c+d x)\right )}{\sqrt {a} d \sqrt {a+b \sin ^4(c+d x)}}-\frac {\left (\sqrt {a+b} \cos ^2(c+d x) \sqrt {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}\right ) \text {Subst}\left (\int \frac {1-\frac {\sqrt {a+b} x^2}{\sqrt {a}}}{\sqrt {a+2 a x^2+(a+b) x^4}} \, dx,x,\tan (c+d x)\right )}{\sqrt {a} d \sqrt {a+b \sin ^4(c+d x)}} \\ & = -\frac {\cos ^2(c+d x) \cot (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\sqrt {a+b} \cos (c+d x) \sin (c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}{a d \sqrt {a+b \sin ^4(c+d x)} \left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right )}-\frac {\sqrt [4]{a+b} \cos ^2(c+d x) E\left (2 \arctan \left (\frac {\sqrt [4]{a+b} \tan (c+d x)}{\sqrt [4]{a}}\right )|\frac {1}{2} \left (1-\frac {\sqrt {a}}{\sqrt {a+b}}\right )\right ) \left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right ) \sqrt {\frac {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}{\left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right )^2}}}{a^{3/4} d \sqrt {a+b \sin ^4(c+d x)}}+\frac {\sqrt [4]{a+b} \cos ^2(c+d x) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{a+b} \tan (c+d x)}{\sqrt [4]{a}}\right ),\frac {1}{2} \left (1-\frac {\sqrt {a}}{\sqrt {a+b}}\right )\right ) \left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right ) \sqrt {\frac {a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)}{\left (\sqrt {a}+\sqrt {a+b} \tan ^2(c+d x)\right )^2}}}{2 a^{3/4} d \sqrt {a+b \sin ^4(c+d x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 9.88 (sec) , antiderivative size = 378, normalized size of antiderivative = 0.79 \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=-\frac {\sqrt {8 a+3 b-4 b \cos (2 (c+d x))+b \cos (4 (c+d x))} \cot (c+d x)}{2 \sqrt {2} a d}-\frac {\cos ^4(c+d x) \left (a \sec ^4(c+d x) \tan (c+d x)+b \tan ^5(c+d x)+\frac {\left (i a+\sqrt {a} \sqrt {b}\right ) \left (E\left (i \text {arcsinh}\left (\sqrt {1-\frac {i \sqrt {b}}{\sqrt {a}}} \tan (c+d x)\right )|\frac {\sqrt {a}+i \sqrt {b}}{\sqrt {a}-i \sqrt {b}}\right )-\operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {1-\frac {i \sqrt {b}}{\sqrt {a}}} \tan (c+d x)\right ),\frac {\sqrt {a}+i \sqrt {b}}{\sqrt {a}-i \sqrt {b}}\right )\right ) \sec ^2(c+d x) \sqrt {1+\left (1-\frac {i \sqrt {b}}{\sqrt {a}}\right ) \tan ^2(c+d x)} \sqrt {1+\left (1+\frac {i \sqrt {b}}{\sqrt {a}}\right ) \tan ^2(c+d x)}}{\sqrt {1-\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{a d \sqrt {\cos ^4(c+d x) \left (a+2 a \tan ^2(c+d x)+(a+b) \tan ^4(c+d x)\right )}} \]
[In]
[Out]
\[\int \frac {\cot ^{2}\left (d x +c \right )}{\sqrt {a +b \left (\sin ^{4}\left (d x +c \right )\right )}}d x\]
[In]
[Out]
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sin \left (d x + c\right )^{4} + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sqrt {a + b \sin ^{4}{\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sin \left (d x + c\right )^{4} + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sin ^4(c+d x)}} \, dx=\int \frac {{\mathrm {cot}\left (c+d\,x\right )}^2}{\sqrt {b\,{\sin \left (c+d\,x\right )}^4+a}} \,d x \]
[In]
[Out]